﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace ImageTagToolViewModel.Others
{
    /// <summary>
    /// pdf document is sent to the printer
    /// </summary>
    class PrintHandler
    {
        /// <summary>
        /// pdf document is sent to the printer
        /// </summary>
        /// <param name="filename">pdf path</param>
        public void SendToPrinter(string filename)
        {
            ProcessStartInfo info = new ProcessStartInfo();
            info.Verb = "print";
            info.FileName = filename;
            info.CreateNoWindow = true;
            info.WindowStyle = ProcessWindowStyle.Hidden;

            Process p = new Process();
            p.StartInfo = info;
            p.Start();

        }
    }
}
